package com.havilahshawn.finaltest22ndsesforad;

import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.widget.EditText;
import android.widget.RadioButton;
import android.widget.RadioGroup;

public class AddActivity extends AppCompatActivity {
    private EditText edtName,edtAge;
    private RadioButton rbMale,rbFemale;
    private RadioGroup rgSex;
    private Uri mCurrentPetUri;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_add);

        Intent intent = getIntent();
        mCurrentPetUri = intent.getData();
        if(mCurrentPetUri == null){
            setTitle("加入学生");
        }else {
            setTitle("编辑学生");
        }

        initView();

    }

    private void initView() {
        edtName = findViewById(R.id.edt_name);
        edtAge = findViewById(R.id.edt_age);
        rbMale = findViewById(R.id.rb_male);
        rbFemale = findViewById(R.id.rb_female);
        rgSex = findViewById(R.id.rg_sex);
    }


}
